function CR=Rand_CR(mu_CR,sigma,NP)
    CR=normrnd(mu_CR,sigma,[1 NP]);
    index1=find(CR>1);
    index2=find(CR<0);
    [~,n1]=size(index1);
    [~,n2]=size(index2);
    while n1~=0||n2~=0
        if n1~=0
            CR(index1)=normrnd(mu_CR,sigma,[1 n1]);
        end
        if n2~=0
            CR(index2)=normrnd(mu_CR,sigma,[1 n2]);
        end
        index1=find(CR>1);
        index2=find(CR<0);
        [~,n1]=size(index1);
        [~,n2]=size(index2);
    end 
end